{"ast":null,"code":"import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"id\", \"prefixCls\", \"className\", \"showSearch\", \"tagRender\", \"direction\", \"omitDomProps\", \"displayValues\", \"onDisplayValuesChange\", \"emptyOptions\", \"notFoundContent\", \"onClear\", \"mode\", \"disabled\", \"loading\", \"getInputElement\", \"getRawInputElement\", \"open\", \"defaultOpen\", \"onDropdownVisibleChange\", \"activeValue\", \"onActiveValueChange\", \"activeDescendantId\", \"searchValue\", \"autoClearSearchValue\", \"onSearch\", \"onSearchSplit\", \"tokenSeparators\", \"allowClear\", \"showArrow\", \"inputIcon\", \"clearIcon\", \"OptionList\", \"animation\", \"transitionName\", \"dropdownStyle\", \"dropdownClassName\", \"dropdownMatchSelectWidth\", \"dropdownRender\", \"dropdownAlign\", \"placement\", \"getPopupContainer\", \"showAction\", \"onFocus\", \"onBlur\", \"onKeyUp\", \"onKeyDown\", \"onMouseDown\"];\nimport classNames from 'classnames';\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport isMobile from \"rc-util/es/isMobile\";\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport { useComposeRef } from \"rc-util/es/ref\";\nimport * as React from 'react';\nimport { BaseSelectContext } from \"./hooks/useBaseProps\";\nimport useDelayReset from \"./hooks/useDelayReset\";\nimport useLock from \"./hooks/useLock\";\nimport useSelectTriggerControl from \"./hooks/useSelectTriggerControl\";\nimport Selector from \"./Selector\";\nimport SelectTrigger from \"./SelectTrigger\";\nimport TransBtn from \"./TransBtn\";\nimport { getSeparatedContent } from \"./utils/valueUtil\";\nvar DEFAULT_OMIT_PROPS = ['value', 'onChange', 'removeIcon', 'placeholder', 'autoFocus', 'maxTagCount', 'maxTagTextLength', 'maxTagPlaceholder', 'choiceTransitionName', 'onInputKeyDown', 'onPopupScroll', 'tabIndex'];\nexport function isMultiple(mode) {\n  return mode === 'tags' || mode === 'multiple';\n}\nvar BaseSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {\n  var _customizeRawInputEle, _classNames2;\n  var id = props.id,\n    prefixCls = props.prefixCls,\n    className = props.className,\n    showSearch = props.showSearch,\n    tagRender = props.tagRender,\n    direction = props.direction,\n    omitDomProps = props.omitDomProps,\n    displayValues = props.displayValues,\n    onDisplayValuesChange = props.onDisplayValuesChange,\n    emptyOptions = props.emptyOptions,\n    _props$notFoundConten = props.notFoundContent,\n    notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,\n    onClear = props.onClear,\n    mode = props.mode,\n    disabled = props.disabled,\n    loading = props.loading,\n    getInputElement = props.getInputElement,\n    getRawInputElement = props.getRawInputElement,\n    open = props.open,\n    defaultOpen = props.defaultOpen,\n    onDropdownVisibleChange = props.onDropdownVisibleChange,\n    activeValue = props.activeValue,\n    onActiveValueChange = props.onActiveValueChange,\n    activeDescendantId = props.activeDescendantId,\n    searchValue = props.searchValue,\n    autoClearSearchValue = props.autoClearSearchValue,\n    onSearch = props.onSearch,\n    onSearchSplit = props.onSearchSplit,\n    tokenSeparators = props.tokenSeparators,\n    allowClear = props.allowClear,\n    showArrow = props.showArrow,\n    inputIcon = props.inputIcon,\n    clearIcon = props.clearIcon,\n    OptionList = props.OptionList,\n    animation = props.animation,\n    transitionName = props.transitionName,\n    dropdownStyle = props.dropdownStyle,\n    dropdownClassName = props.dropdownClassName,\n    dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n    dropdownRender = props.dropdownRender,\n    dropdownAlign = props.dropdownAlign,\n    placement = props.placement,\n    getPopupContainer = props.getPopupContainer,\n    _props$showAction = props.showAction,\n    showAction = _props$showAction === void 0 ? [] : _props$showAction,\n    onFocus = props.onFocus,\n    onBlur = props.onBlur,\n    onKeyUp = props.onKeyUp,\n    onKeyDown = props.onKeyDown,\n    onMouseDown = props.onMouseDown,\n    restProps = _objectWithoutProperties(props, _excluded); // ============================== MISC ==============================\n\n  var multiple = isMultiple(mode);\n  var mergedShowSearch = (showSearch !== undefined ? showSearch : multiple) || mode === 'combobox';\n  var domProps = _objectSpread({}, restProps);\n  DEFAULT_OMIT_PROPS.forEach(function (propName) {\n    delete domProps[propName];\n  });\n  omitDomProps === null || omitDomProps === void 0 ? void 0 : omitDomProps.forEach(function (propName) {\n    delete domProps[propName];\n  }); // ============================= Mobile =============================\n\n  var _React$useState = React.useState(false),\n    _React$useState2 = _slicedToArray(_React$useState, 2),\n    mobile = _React$useState2[0],\n    setMobile = _React$useState2[1];\n  React.useEffect(function () {\n    // Only update on the client side\n    setMobile(isMobile());\n  }, []); // ============================== Refs ==============================\n\n  var containerRef = React.useRef(null);\n  var selectorDomRef = React.useRef(null);\n  var triggerRef = React.useRef(null);\n  var selectorRef = React.useRef(null);\n  var listRef = React.useRef(null);\n  /** Used for component focused management */\n\n  var _useDelayReset = useDelayReset(),\n    _useDelayReset2 = _slicedToArray(_useDelayReset, 3),\n    mockFocused = _useDelayReset2[0],\n    setMockFocused = _useDelayReset2[1],\n    cancelSetMockFocused = _useDelayReset2[2]; // =========================== Imperative ===========================\n\n  React.useImperativeHandle(ref, function () {\n    var _selectorRef$current, _selectorRef$current2;\n    return {\n      focus: (_selectorRef$current = selectorRef.current) === null || _selectorRef$current === void 0 ? void 0 : _selectorRef$current.focus,\n      blur: (_selectorRef$current2 = selectorRef.current) === null || _selectorRef$current2 === void 0 ? void 0 : _selectorRef$current2.blur,\n      scrollTo: function scrollTo(arg) {\n        var _listRef$current;\n        return (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.scrollTo(arg);\n      }\n    };\n  }); // ========================== Search Value ==========================\n\n  var mergedSearchValue = React.useMemo(function () {\n    var _displayValues$;\n    if (mode !== 'combobox') {\n      return searchValue;\n    }\n    var val = (_displayValues$ = displayValues[0]) === null || _displayValues$ === void 0 ? void 0 : _displayValues$.value;\n    return typeof val === 'string' || typeof val === 'number' ? String(val) : '';\n  }, [searchValue, mode, displayValues]); // ========================== Custom Input ==========================\n  // Only works in `combobox`\n\n  var customizeInputElement = mode === 'combobox' && typeof getInputElement === 'function' && getInputElement() || null; // Used for customize replacement for `rc-cascader`\n\n  var customizeRawInputElement = typeof getRawInputElement === 'function' && getRawInputElement();\n  var customizeRawInputRef = useComposeRef(selectorDomRef, customizeRawInputElement === null || customizeRawInputElement === void 0 ? void 0 : (_customizeRawInputEle = customizeRawInputElement.props) === null || _customizeRawInputEle === void 0 ? void 0 : _customizeRawInputEle.ref); // ============================== Open ==============================\n\n  var _useMergedState = useMergedState(undefined, {\n      defaultValue: defaultOpen,\n      value: open\n    }),\n    _useMergedState2 = _slicedToArray(_useMergedState, 2),\n    innerOpen = _useMergedState2[0],\n    setInnerOpen = _useMergedState2[1];\n  var mergedOpen = innerOpen; // Not trigger `open` in `combobox` when `notFoundContent` is empty\n\n  var emptyListContent = !notFoundContent && emptyOptions;\n  if (disabled || emptyListContent && mergedOpen && mode === 'combobox') {\n    mergedOpen = false;\n  }\n  var triggerOpen = emptyListContent ? false : mergedOpen;\n  var onToggleOpen = React.useCallback(function (newOpen) {\n    var nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;\n    if (!disabled) {\n      setInnerOpen(nextOpen);\n      if (mergedOpen !== nextOpen) {\n        onDropdownVisibleChange === null || onDropdownVisibleChange === void 0 ? void 0 : onDropdownVisibleChange(nextOpen);\n      }\n    }\n  }, [disabled, mergedOpen, setInnerOpen, onDropdownVisibleChange]); // ============================= Search =============================\n\n  var tokenWithEnter = React.useMemo(function () {\n    return (tokenSeparators || []).some(function (tokenSeparator) {\n      return ['\\n', '\\r\\n'].includes(tokenSeparator);\n    });\n  }, [tokenSeparators]);\n  var onInternalSearch = function onInternalSearch(searchText, fromTyping, isCompositing) {\n    var ret = true;\n    var newSearchText = searchText;\n    onActiveValueChange === null || onActiveValueChange === void 0 ? void 0 : onActiveValueChange(null); // Check if match the `tokenSeparators`\n\n    var patchLabels = isCompositing ? null : getSeparatedContent(searchText, tokenSeparators); // Ignore combobox since it's not split-able\n\n    if (mode !== 'combobox' && patchLabels) {\n      newSearchText = '';\n      onSearchSplit === null || onSearchSplit === void 0 ? void 0 : onSearchSplit(patchLabels); // Should close when paste finish\n\n      onToggleOpen(false); // Tell Selector that break next actions\n\n      ret = false;\n    }\n    if (onSearch && mergedSearchValue !== newSearchText) {\n      onSearch(newSearchText, {\n        source: fromTyping ? 'typing' : 'effect'\n      });\n    }\n    return ret;\n  }; // Only triggered when menu is closed & mode is tags\n  // If menu is open, OptionList will take charge\n  // If mode isn't tags, press enter is not meaningful when you can't see any option\n\n  var onInternalSearchSubmit = function onInternalSearchSubmit(searchText) {\n    // prevent empty tags from appearing when you click the Enter button\n    if (!searchText || !searchText.trim()) {\n      return;\n    }\n    onSearch(searchText, {\n      source: 'submit'\n    });\n  }; // Close will clean up single mode search text\n\n  React.useEffect(function () {\n    if (!mergedOpen && !multiple && mode !== 'combobox') {\n      onInternalSearch('', false, false);\n    }\n  }, [mergedOpen]); // ============================ Disabled ============================\n  // Close dropdown & remove focus state when disabled change\n\n  React.useEffect(function () {\n    if (innerOpen && disabled) {\n      setInnerOpen(false);\n    }\n    if (disabled) {\n      setMockFocused(false);\n    }\n  }, [disabled]); // ============================ Keyboard ============================\n\n  /**\n   * We record input value here to check if can press to clean up by backspace\n   * - null: Key is not down, this is reset by key up\n   * - true: Search text is empty when first time backspace down\n   * - false: Search text is not empty when first time backspace down\n   */\n\n  var _useLock = useLock(),\n    _useLock2 = _slicedToArray(_useLock, 2),\n    getClearLock = _useLock2[0],\n    setClearLock = _useLock2[1]; // KeyDown\n\n  var onInternalKeyDown = function onInternalKeyDown(event) {\n    var clearLock = getClearLock();\n    var which = event.which;\n    if (which === KeyCode.ENTER) {\n      // Do not submit form when type in the input\n      if (mode !== 'combobox') {\n        event.preventDefault();\n      } // We only manage open state here, close logic should handle by list component\n\n      if (!mergedOpen) {\n        onToggleOpen(true);\n      }\n    }\n    setClearLock(!!mergedSearchValue); // Remove value by `backspace`\n\n    if (which === KeyCode.BACKSPACE && !clearLock && multiple && !mergedSearchValue && displayValues.length) {\n      var cloneDisplayValues = _toConsumableArray(displayValues);\n      var removedDisplayValue = null;\n      for (var i = cloneDisplayValues.length - 1; i >= 0; i -= 1) {\n        var current = cloneDisplayValues[i];\n        if (!current.disabled) {\n          cloneDisplayValues.splice(i, 1);\n          removedDisplayValue = current;\n          break;\n        }\n      }\n      if (removedDisplayValue) {\n        onDisplayValuesChange(cloneDisplayValues, {\n          type: 'remove',\n          values: [removedDisplayValue]\n        });\n      }\n    }\n    for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      rest[_key - 1] = arguments[_key];\n    }\n    if (mergedOpen && listRef.current) {\n      var _listRef$current2;\n      (_listRef$current2 = listRef.current).onKeyDown.apply(_listRef$current2, [event].concat(rest));\n    }\n    onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown.apply(void 0, [event].concat(rest));\n  }; // KeyUp\n\n  var onInternalKeyUp = function onInternalKeyUp(event) {\n    for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n      rest[_key2 - 1] = arguments[_key2];\n    }\n    if (mergedOpen && listRef.current) {\n      var _listRef$current3;\n      (_listRef$current3 = listRef.current).onKeyUp.apply(_listRef$current3, [event].concat(rest));\n    }\n    onKeyUp === null || onKeyUp === void 0 ? void 0 : onKeyUp.apply(void 0, [event].concat(rest));\n  }; // ============================ Selector ============================\n\n  var onSelectorRemove = function onSelectorRemove(val) {\n    var newValues = displayValues.filter(function (i) {\n      return i !== val;\n    });\n    onDisplayValuesChange(newValues, {\n      type: 'remove',\n      values: [val]\n    });\n  }; // ========================== Focus / Blur ==========================\n\n  /** Record real focus status */\n\n  var focusRef = React.useRef(false);\n  var onContainerFocus = function onContainerFocus() {\n    setMockFocused(true);\n    if (!disabled) {\n      if (onFocus && !focusRef.current) {\n        onFocus.apply(void 0, arguments);\n      } // `showAction` should handle `focus` if set\n\n      if (showAction.includes('focus')) {\n        onToggleOpen(true);\n      }\n    }\n    focusRef.current = true;\n  };\n  var onContainerBlur = function onContainerBlur() {\n    setMockFocused(false, function () {\n      focusRef.current = false;\n      onToggleOpen(false);\n    });\n    if (disabled) {\n      return;\n    }\n    if (mergedSearchValue) {\n      // `tags` mode should move `searchValue` into values\n      if (mode === 'tags') {\n        onSearch(mergedSearchValue, {\n          source: 'submit'\n        });\n      } else if (mode === 'multiple') {\n        // `multiple` mode only clean the search value but not trigger event\n        onSearch('', {\n          source: 'blur'\n        });\n      }\n    }\n    if (onBlur) {\n      onBlur.apply(void 0, arguments);\n    }\n  }; // Give focus back of Select\n\n  var activeTimeoutIds = [];\n  React.useEffect(function () {\n    return function () {\n      activeTimeoutIds.forEach(function (timeoutId) {\n        return clearTimeout(timeoutId);\n      });\n      activeTimeoutIds.splice(0, activeTimeoutIds.length);\n    };\n  }, []);\n  var onInternalMouseDown = function onInternalMouseDown(event) {\n    var _triggerRef$current;\n    var target = event.target;\n    var popupElement = (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.getPopupElement(); // We should give focus back to selector if clicked item is not focusable\n\n    if (popupElement && popupElement.contains(target)) {\n      var timeoutId = setTimeout(function () {\n        var index = activeTimeoutIds.indexOf(timeoutId);\n        if (index !== -1) {\n          activeTimeoutIds.splice(index, 1);\n        }\n        cancelSetMockFocused();\n        if (!mobile && !popupElement.contains(document.activeElement)) {\n          var _selectorRef$current3;\n          (_selectorRef$current3 = selectorRef.current) === null || _selectorRef$current3 === void 0 ? void 0 : _selectorRef$current3.focus();\n        }\n      });\n      activeTimeoutIds.push(timeoutId);\n    }\n    for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n      restArgs[_key3 - 1] = arguments[_key3];\n    }\n    onMouseDown === null || onMouseDown === void 0 ? void 0 : onMouseDown.apply(void 0, [event].concat(restArgs));\n  }; // ============================ Dropdown ============================\n\n  var _React$useState3 = React.useState(null),\n    _React$useState4 = _slicedToArray(_React$useState3, 2),\n    containerWidth = _React$useState4[0],\n    setContainerWidth = _React$useState4[1];\n  var _React$useState5 = React.useState({}),\n    _React$useState6 = _slicedToArray(_React$useState5, 2),\n    forceUpdate = _React$useState6[1]; // We need force update here since popup dom is render async\n\n  function onPopupMouseEnter() {\n    forceUpdate({});\n  }\n  useLayoutEffect(function () {\n    if (triggerOpen) {\n      var _containerRef$current;\n      var newWidth = Math.ceil((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.offsetWidth);\n      if (containerWidth !== newWidth && !Number.isNaN(newWidth)) {\n        setContainerWidth(newWidth);\n      }\n    }\n  }, [triggerOpen]); // Used for raw custom input trigger\n\n  var onTriggerVisibleChange;\n  if (customizeRawInputElement) {\n    onTriggerVisibleChange = function onTriggerVisibleChange(newOpen) {\n      onToggleOpen(newOpen);\n    };\n  } // Close when click on non-select element\n\n  useSelectTriggerControl(function () {\n    var _triggerRef$current2;\n    return [containerRef.current, (_triggerRef$current2 = triggerRef.current) === null || _triggerRef$current2 === void 0 ? void 0 : _triggerRef$current2.getPopupElement()];\n  }, triggerOpen, onToggleOpen, !!customizeRawInputElement); // ============================ Context =============================\n\n  var baseSelectContext = React.useMemo(function () {\n    return _objectSpread(_objectSpread({}, props), {}, {\n      notFoundContent: notFoundContent,\n      open: mergedOpen,\n      triggerOpen: triggerOpen,\n      id: id,\n      showSearch: mergedShowSearch,\n      multiple: multiple,\n      toggleOpen: onToggleOpen\n    });\n  }, [props, notFoundContent, triggerOpen, mergedOpen, id, mergedShowSearch, multiple, onToggleOpen]); // ==================================================================\n  // ==                            Render                            ==\n  // ==================================================================\n  // ============================= Arrow ==============================\n\n  var mergedShowArrow = showArrow !== undefined ? showArrow : loading || !multiple && mode !== 'combobox';\n  var arrowNode;\n  if (mergedShowArrow) {\n    arrowNode = /*#__PURE__*/React.createElement(TransBtn, {\n      className: classNames(\"\".concat(prefixCls, \"-arrow\"), _defineProperty({}, \"\".concat(prefixCls, \"-arrow-loading\"), loading)),\n      customizeIcon: inputIcon,\n      customizeIconProps: {\n        loading: loading,\n        searchValue: mergedSearchValue,\n        open: mergedOpen,\n        focused: mockFocused,\n        showSearch: mergedShowSearch\n      }\n    });\n  } // ============================= Clear ==============================\n\n  var clearNode;\n  var onClearMouseDown = function onClearMouseDown() {\n    var _selectorRef$current4;\n    onClear === null || onClear === void 0 ? void 0 : onClear();\n    (_selectorRef$current4 = selectorRef.current) === null || _selectorRef$current4 === void 0 ? void 0 : _selectorRef$current4.focus();\n    onDisplayValuesChange([], {\n      type: 'clear',\n      values: displayValues\n    });\n    onInternalSearch('', false, false);\n  };\n  if (!disabled && allowClear && (displayValues.length || mergedSearchValue) && !(mode === 'combobox' && mergedSearchValue === '')) {\n    clearNode = /*#__PURE__*/React.createElement(TransBtn, {\n      className: \"\".concat(prefixCls, \"-clear\"),\n      onMouseDown: onClearMouseDown,\n      customizeIcon: clearIcon\n    }, \"\\xD7\");\n  } // =========================== OptionList ===========================\n\n  var optionList = /*#__PURE__*/React.createElement(OptionList, {\n    ref: listRef\n  }); // ============================= Select =============================\n\n  var mergedClassName = classNames(prefixCls, className, (_classNames2 = {}, _defineProperty(_classNames2, \"\".concat(prefixCls, \"-focused\"), mockFocused), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-multiple\"), multiple), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-single\"), !multiple), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-allow-clear\"), allowClear), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-show-arrow\"), mergedShowArrow), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-disabled\"), disabled), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-loading\"), loading), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-open\"), mergedOpen), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-customize-input\"), customizeInputElement), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-show-search\"), mergedShowSearch), _classNames2)); // >>> Selector\n\n  var selectorNode = /*#__PURE__*/React.createElement(SelectTrigger, {\n    ref: triggerRef,\n    disabled: disabled,\n    prefixCls: prefixCls,\n    visible: triggerOpen,\n    popupElement: optionList,\n    containerWidth: containerWidth,\n    animation: animation,\n    transitionName: transitionName,\n    dropdownStyle: dropdownStyle,\n    dropdownClassName: dropdownClassName,\n    direction: direction,\n    dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n    dropdownRender: dropdownRender,\n    dropdownAlign: dropdownAlign,\n    placement: placement,\n    getPopupContainer: getPopupContainer,\n    empty: emptyOptions,\n    getTriggerDOMNode: function getTriggerDOMNode() {\n      return selectorDomRef.current;\n    },\n    onPopupVisibleChange: onTriggerVisibleChange,\n    onPopupMouseEnter: onPopupMouseEnter\n  }, customizeRawInputElement ? /*#__PURE__*/React.cloneElement(customizeRawInputElement, {\n    ref: customizeRawInputRef\n  }) : /*#__PURE__*/React.createElement(Selector, _extends({}, props, {\n    domRef: selectorDomRef,\n    prefixCls: prefixCls,\n    inputElement: customizeInputElement,\n    ref: selectorRef,\n    id: id,\n    showSearch: mergedShowSearch,\n    autoClearSearchValue: autoClearSearchValue,\n    mode: mode,\n    activeDescendantId: activeDescendantId,\n    tagRender: tagRender,\n    values: displayValues,\n    open: mergedOpen,\n    onToggleOpen: onToggleOpen,\n    activeValue: activeValue,\n    searchValue: mergedSearchValue,\n    onSearch: onInternalSearch,\n    onSearchSubmit: onInternalSearchSubmit,\n    onRemove: onSelectorRemove,\n    tokenWithEnter: tokenWithEnter\n  }))); // >>> Render\n\n  var renderNode; // Render raw\n\n  if (customizeRawInputElement) {\n    renderNode = selectorNode;\n  } else {\n    renderNode = /*#__PURE__*/React.createElement(\"div\", _extends({\n      className: mergedClassName\n    }, domProps, {\n      ref: containerRef,\n      onMouseDown: onInternalMouseDown,\n      onKeyDown: onInternalKeyDown,\n      onKeyUp: onInternalKeyUp,\n      onFocus: onContainerFocus,\n      onBlur: onContainerBlur\n    }), mockFocused && !mergedOpen && /*#__PURE__*/React.createElement(\"span\", {\n      style: {\n        width: 0,\n        height: 0,\n        position: 'absolute',\n        overflow: 'hidden',\n        opacity: 0\n      },\n      \"aria-live\": \"polite\"\n    }, \"\".concat(displayValues.map(function (_ref) {\n      var label = _ref.label,\n        value = _ref.value;\n      return ['number', 'string'].includes(_typeof(label)) ? label : value;\n    }).join(', '))), selectorNode, arrowNode, clearNode);\n  }\n  return /*#__PURE__*/React.createElement(BaseSelectContext.Provider, {\n    value: baseSelectContext\n  }, renderNode);\n}); // Set display name for dev\n\nif (process.env.NODE_ENV !== 'production') {\n  BaseSelect.displayName = 'BaseSelect';\n}\nexport default BaseSelect;","map":{"version":3,"names":["_typeof","_extends","_defineProperty","_toConsumableArray","_slicedToArray","_objectSpread","_objectWithoutProperties","_excluded","classNames","useLayoutEffect","useMergedState","isMobile","KeyCode","useComposeRef","React","BaseSelectContext","useDelayReset","useLock","useSelectTriggerControl","Selector","SelectTrigger","TransBtn","getSeparatedContent","DEFAULT_OMIT_PROPS","isMultiple","mode","BaseSelect","forwardRef","props","ref","_customizeRawInputEle","_classNames2","id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","_props$notFoundConten","notFoundContent","onClear","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","showArrow","inputIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","getPopupContainer","_props$showAction","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown","restProps","multiple","mergedShowSearch","undefined","domProps","forEach","propName","_React$useState","useState","_React$useState2","mobile","setMobile","useEffect","containerRef","useRef","selectorDomRef","triggerRef","selectorRef","listRef","_useDelayReset","_useDelayReset2","mockFocused","setMockFocused","cancelSetMockFocused","useImperativeHandle","_selectorRef$current","_selectorRef$current2","focus","current","blur","scrollTo","arg","_listRef$current","mergedSearchValue","useMemo","_displayValues$","val","value","String","customizeInputElement","customizeRawInputElement","customizeRawInputRef","_useMergedState","defaultValue","_useMergedState2","innerOpen","setInnerOpen","mergedOpen","emptyListContent","triggerOpen","onToggleOpen","useCallback","newOpen","nextOpen","tokenWithEnter","some","tokenSeparator","includes","onInternalSearch","searchText","fromTyping","isCompositing","ret","newSearchText","patchLabels","source","onInternalSearchSubmit","trim","_useLock","_useLock2","getClearLock","setClearLock","onInternalKeyDown","event","clearLock","which","ENTER","preventDefault","BACKSPACE","length","cloneDisplayValues","removedDisplayValue","i","splice","type","values","_len","arguments","rest","Array","_key","_listRef$current2","apply","concat","onInternalKeyUp","_len2","_key2","_listRef$current3","onSelectorRemove","newValues","filter","focusRef","onContainerFocus","onContainerBlur","activeTimeoutIds","timeoutId","clearTimeout","onInternalMouseDown","_triggerRef$current","target","popupElement","getPopupElement","contains","setTimeout","index","indexOf","document","activeElement","_selectorRef$current3","push","_len3","restArgs","_key3","_React$useState3","_React$useState4","containerWidth","setContainerWidth","_React$useState5","_React$useState6","forceUpdate","onPopupMouseEnter","_containerRef$current","newWidth","Math","ceil","offsetWidth","Number","isNaN","onTriggerVisibleChange","_triggerRef$current2","baseSelectContext","toggleOpen","mergedShowArrow","arrowNode","createElement","customizeIcon","customizeIconProps","focused","clearNode","onClearMouseDown","_selectorRef$current4","optionList","mergedClassName","selectorNode","visible","empty","getTriggerDOMNode","onPopupVisibleChange","cloneElement","domRef","inputElement","onSearchSubmit","onRemove","renderNode","style","width","height","position","overflow","opacity","map","_ref","label","join","Provider","process","env","NODE_ENV","displayName"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-select/es/BaseSelect.js"],"sourcesContent":["import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"id\", \"prefixCls\", \"className\", \"showSearch\", \"tagRender\", \"direction\", \"omitDomProps\", \"displayValues\", \"onDisplayValuesChange\", \"emptyOptions\", \"notFoundContent\", \"onClear\", \"mode\", \"disabled\", \"loading\", \"getInputElement\", \"getRawInputElement\", \"open\", \"defaultOpen\", \"onDropdownVisibleChange\", \"activeValue\", \"onActiveValueChange\", \"activeDescendantId\", \"searchValue\", \"autoClearSearchValue\", \"onSearch\", \"onSearchSplit\", \"tokenSeparators\", \"allowClear\", \"showArrow\", \"inputIcon\", \"clearIcon\", \"OptionList\", \"animation\", \"transitionName\", \"dropdownStyle\", \"dropdownClassName\", \"dropdownMatchSelectWidth\", \"dropdownRender\", \"dropdownAlign\", \"placement\", \"getPopupContainer\", \"showAction\", \"onFocus\", \"onBlur\", \"onKeyUp\", \"onKeyDown\", \"onMouseDown\"];\nimport classNames from 'classnames';\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport isMobile from \"rc-util/es/isMobile\";\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport { useComposeRef } from \"rc-util/es/ref\";\nimport * as React from 'react';\nimport { BaseSelectContext } from \"./hooks/useBaseProps\";\nimport useDelayReset from \"./hooks/useDelayReset\";\nimport useLock from \"./hooks/useLock\";\nimport useSelectTriggerControl from \"./hooks/useSelectTriggerControl\";\nimport Selector from \"./Selector\";\nimport SelectTrigger from \"./SelectTrigger\";\nimport TransBtn from \"./TransBtn\";\nimport { getSeparatedContent } from \"./utils/valueUtil\";\nvar DEFAULT_OMIT_PROPS = ['value', 'onChange', 'removeIcon', 'placeholder', 'autoFocus', 'maxTagCount', 'maxTagTextLength', 'maxTagPlaceholder', 'choiceTransitionName', 'onInputKeyDown', 'onPopupScroll', 'tabIndex'];\nexport function isMultiple(mode) {\n  return mode === 'tags' || mode === 'multiple';\n}\nvar BaseSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {\n  var _customizeRawInputEle, _classNames2;\n\n  var id = props.id,\n      prefixCls = props.prefixCls,\n      className = props.className,\n      showSearch = props.showSearch,\n      tagRender = props.tagRender,\n      direction = props.direction,\n      omitDomProps = props.omitDomProps,\n      displayValues = props.displayValues,\n      onDisplayValuesChange = props.onDisplayValuesChange,\n      emptyOptions = props.emptyOptions,\n      _props$notFoundConten = props.notFoundContent,\n      notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,\n      onClear = props.onClear,\n      mode = props.mode,\n      disabled = props.disabled,\n      loading = props.loading,\n      getInputElement = props.getInputElement,\n      getRawInputElement = props.getRawInputElement,\n      open = props.open,\n      defaultOpen = props.defaultOpen,\n      onDropdownVisibleChange = props.onDropdownVisibleChange,\n      activeValue = props.activeValue,\n      onActiveValueChange = props.onActiveValueChange,\n      activeDescendantId = props.activeDescendantId,\n      searchValue = props.searchValue,\n      autoClearSearchValue = props.autoClearSearchValue,\n      onSearch = props.onSearch,\n      onSearchSplit = props.onSearchSplit,\n      tokenSeparators = props.tokenSeparators,\n      allowClear = props.allowClear,\n      showArrow = props.showArrow,\n      inputIcon = props.inputIcon,\n      clearIcon = props.clearIcon,\n      OptionList = props.OptionList,\n      animation = props.animation,\n      transitionName = props.transitionName,\n      dropdownStyle = props.dropdownStyle,\n      dropdownClassName = props.dropdownClassName,\n      dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n      dropdownRender = props.dropdownRender,\n      dropdownAlign = props.dropdownAlign,\n      placement = props.placement,\n      getPopupContainer = props.getPopupContainer,\n      _props$showAction = props.showAction,\n      showAction = _props$showAction === void 0 ? [] : _props$showAction,\n      onFocus = props.onFocus,\n      onBlur = props.onBlur,\n      onKeyUp = props.onKeyUp,\n      onKeyDown = props.onKeyDown,\n      onMouseDown = props.onMouseDown,\n      restProps = _objectWithoutProperties(props, _excluded); // ============================== MISC ==============================\n\n\n  var multiple = isMultiple(mode);\n  var mergedShowSearch = (showSearch !== undefined ? showSearch : multiple) || mode === 'combobox';\n\n  var domProps = _objectSpread({}, restProps);\n\n  DEFAULT_OMIT_PROPS.forEach(function (propName) {\n    delete domProps[propName];\n  });\n  omitDomProps === null || omitDomProps === void 0 ? void 0 : omitDomProps.forEach(function (propName) {\n    delete domProps[propName];\n  }); // ============================= Mobile =============================\n\n  var _React$useState = React.useState(false),\n      _React$useState2 = _slicedToArray(_React$useState, 2),\n      mobile = _React$useState2[0],\n      setMobile = _React$useState2[1];\n\n  React.useEffect(function () {\n    // Only update on the client side\n    setMobile(isMobile());\n  }, []); // ============================== Refs ==============================\n\n  var containerRef = React.useRef(null);\n  var selectorDomRef = React.useRef(null);\n  var triggerRef = React.useRef(null);\n  var selectorRef = React.useRef(null);\n  var listRef = React.useRef(null);\n  /** Used for component focused management */\n\n  var _useDelayReset = useDelayReset(),\n      _useDelayReset2 = _slicedToArray(_useDelayReset, 3),\n      mockFocused = _useDelayReset2[0],\n      setMockFocused = _useDelayReset2[1],\n      cancelSetMockFocused = _useDelayReset2[2]; // =========================== Imperative ===========================\n\n\n  React.useImperativeHandle(ref, function () {\n    var _selectorRef$current, _selectorRef$current2;\n\n    return {\n      focus: (_selectorRef$current = selectorRef.current) === null || _selectorRef$current === void 0 ? void 0 : _selectorRef$current.focus,\n      blur: (_selectorRef$current2 = selectorRef.current) === null || _selectorRef$current2 === void 0 ? void 0 : _selectorRef$current2.blur,\n      scrollTo: function scrollTo(arg) {\n        var _listRef$current;\n\n        return (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.scrollTo(arg);\n      }\n    };\n  }); // ========================== Search Value ==========================\n\n  var mergedSearchValue = React.useMemo(function () {\n    var _displayValues$;\n\n    if (mode !== 'combobox') {\n      return searchValue;\n    }\n\n    var val = (_displayValues$ = displayValues[0]) === null || _displayValues$ === void 0 ? void 0 : _displayValues$.value;\n    return typeof val === 'string' || typeof val === 'number' ? String(val) : '';\n  }, [searchValue, mode, displayValues]); // ========================== Custom Input ==========================\n  // Only works in `combobox`\n\n  var customizeInputElement = mode === 'combobox' && typeof getInputElement === 'function' && getInputElement() || null; // Used for customize replacement for `rc-cascader`\n\n  var customizeRawInputElement = typeof getRawInputElement === 'function' && getRawInputElement();\n  var customizeRawInputRef = useComposeRef(selectorDomRef, customizeRawInputElement === null || customizeRawInputElement === void 0 ? void 0 : (_customizeRawInputEle = customizeRawInputElement.props) === null || _customizeRawInputEle === void 0 ? void 0 : _customizeRawInputEle.ref); // ============================== Open ==============================\n\n  var _useMergedState = useMergedState(undefined, {\n    defaultValue: defaultOpen,\n    value: open\n  }),\n      _useMergedState2 = _slicedToArray(_useMergedState, 2),\n      innerOpen = _useMergedState2[0],\n      setInnerOpen = _useMergedState2[1];\n\n  var mergedOpen = innerOpen; // Not trigger `open` in `combobox` when `notFoundContent` is empty\n\n  var emptyListContent = !notFoundContent && emptyOptions;\n\n  if (disabled || emptyListContent && mergedOpen && mode === 'combobox') {\n    mergedOpen = false;\n  }\n\n  var triggerOpen = emptyListContent ? false : mergedOpen;\n  var onToggleOpen = React.useCallback(function (newOpen) {\n    var nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;\n\n    if (!disabled) {\n      setInnerOpen(nextOpen);\n\n      if (mergedOpen !== nextOpen) {\n        onDropdownVisibleChange === null || onDropdownVisibleChange === void 0 ? void 0 : onDropdownVisibleChange(nextOpen);\n      }\n    }\n  }, [disabled, mergedOpen, setInnerOpen, onDropdownVisibleChange]); // ============================= Search =============================\n\n  var tokenWithEnter = React.useMemo(function () {\n    return (tokenSeparators || []).some(function (tokenSeparator) {\n      return ['\\n', '\\r\\n'].includes(tokenSeparator);\n    });\n  }, [tokenSeparators]);\n\n  var onInternalSearch = function onInternalSearch(searchText, fromTyping, isCompositing) {\n    var ret = true;\n    var newSearchText = searchText;\n    onActiveValueChange === null || onActiveValueChange === void 0 ? void 0 : onActiveValueChange(null); // Check if match the `tokenSeparators`\n\n    var patchLabels = isCompositing ? null : getSeparatedContent(searchText, tokenSeparators); // Ignore combobox since it's not split-able\n\n    if (mode !== 'combobox' && patchLabels) {\n      newSearchText = '';\n      onSearchSplit === null || onSearchSplit === void 0 ? void 0 : onSearchSplit(patchLabels); // Should close when paste finish\n\n      onToggleOpen(false); // Tell Selector that break next actions\n\n      ret = false;\n    }\n\n    if (onSearch && mergedSearchValue !== newSearchText) {\n      onSearch(newSearchText, {\n        source: fromTyping ? 'typing' : 'effect'\n      });\n    }\n\n    return ret;\n  }; // Only triggered when menu is closed & mode is tags\n  // If menu is open, OptionList will take charge\n  // If mode isn't tags, press enter is not meaningful when you can't see any option\n\n\n  var onInternalSearchSubmit = function onInternalSearchSubmit(searchText) {\n    // prevent empty tags from appearing when you click the Enter button\n    if (!searchText || !searchText.trim()) {\n      return;\n    }\n\n    onSearch(searchText, {\n      source: 'submit'\n    });\n  }; // Close will clean up single mode search text\n\n\n  React.useEffect(function () {\n    if (!mergedOpen && !multiple && mode !== 'combobox') {\n      onInternalSearch('', false, false);\n    }\n  }, [mergedOpen]); // ============================ Disabled ============================\n  // Close dropdown & remove focus state when disabled change\n\n  React.useEffect(function () {\n    if (innerOpen && disabled) {\n      setInnerOpen(false);\n    }\n\n    if (disabled) {\n      setMockFocused(false);\n    }\n  }, [disabled]); // ============================ Keyboard ============================\n\n  /**\n   * We record input value here to check if can press to clean up by backspace\n   * - null: Key is not down, this is reset by key up\n   * - true: Search text is empty when first time backspace down\n   * - false: Search text is not empty when first time backspace down\n   */\n\n  var _useLock = useLock(),\n      _useLock2 = _slicedToArray(_useLock, 2),\n      getClearLock = _useLock2[0],\n      setClearLock = _useLock2[1]; // KeyDown\n\n\n  var onInternalKeyDown = function onInternalKeyDown(event) {\n    var clearLock = getClearLock();\n    var which = event.which;\n\n    if (which === KeyCode.ENTER) {\n      // Do not submit form when type in the input\n      if (mode !== 'combobox') {\n        event.preventDefault();\n      } // We only manage open state here, close logic should handle by list component\n\n\n      if (!mergedOpen) {\n        onToggleOpen(true);\n      }\n    }\n\n    setClearLock(!!mergedSearchValue); // Remove value by `backspace`\n\n    if (which === KeyCode.BACKSPACE && !clearLock && multiple && !mergedSearchValue && displayValues.length) {\n      var cloneDisplayValues = _toConsumableArray(displayValues);\n\n      var removedDisplayValue = null;\n\n      for (var i = cloneDisplayValues.length - 1; i >= 0; i -= 1) {\n        var current = cloneDisplayValues[i];\n\n        if (!current.disabled) {\n          cloneDisplayValues.splice(i, 1);\n          removedDisplayValue = current;\n          break;\n        }\n      }\n\n      if (removedDisplayValue) {\n        onDisplayValuesChange(cloneDisplayValues, {\n          type: 'remove',\n          values: [removedDisplayValue]\n        });\n      }\n    }\n\n    for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      rest[_key - 1] = arguments[_key];\n    }\n\n    if (mergedOpen && listRef.current) {\n      var _listRef$current2;\n\n      (_listRef$current2 = listRef.current).onKeyDown.apply(_listRef$current2, [event].concat(rest));\n    }\n\n    onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown.apply(void 0, [event].concat(rest));\n  }; // KeyUp\n\n\n  var onInternalKeyUp = function onInternalKeyUp(event) {\n    for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n      rest[_key2 - 1] = arguments[_key2];\n    }\n\n    if (mergedOpen && listRef.current) {\n      var _listRef$current3;\n\n      (_listRef$current3 = listRef.current).onKeyUp.apply(_listRef$current3, [event].concat(rest));\n    }\n\n    onKeyUp === null || onKeyUp === void 0 ? void 0 : onKeyUp.apply(void 0, [event].concat(rest));\n  }; // ============================ Selector ============================\n\n\n  var onSelectorRemove = function onSelectorRemove(val) {\n    var newValues = displayValues.filter(function (i) {\n      return i !== val;\n    });\n    onDisplayValuesChange(newValues, {\n      type: 'remove',\n      values: [val]\n    });\n  }; // ========================== Focus / Blur ==========================\n\n  /** Record real focus status */\n\n\n  var focusRef = React.useRef(false);\n\n  var onContainerFocus = function onContainerFocus() {\n    setMockFocused(true);\n\n    if (!disabled) {\n      if (onFocus && !focusRef.current) {\n        onFocus.apply(void 0, arguments);\n      } // `showAction` should handle `focus` if set\n\n\n      if (showAction.includes('focus')) {\n        onToggleOpen(true);\n      }\n    }\n\n    focusRef.current = true;\n  };\n\n  var onContainerBlur = function onContainerBlur() {\n    setMockFocused(false, function () {\n      focusRef.current = false;\n      onToggleOpen(false);\n    });\n\n    if (disabled) {\n      return;\n    }\n\n    if (mergedSearchValue) {\n      // `tags` mode should move `searchValue` into values\n      if (mode === 'tags') {\n        onSearch(mergedSearchValue, {\n          source: 'submit'\n        });\n      } else if (mode === 'multiple') {\n        // `multiple` mode only clean the search value but not trigger event\n        onSearch('', {\n          source: 'blur'\n        });\n      }\n    }\n\n    if (onBlur) {\n      onBlur.apply(void 0, arguments);\n    }\n  }; // Give focus back of Select\n\n\n  var activeTimeoutIds = [];\n  React.useEffect(function () {\n    return function () {\n      activeTimeoutIds.forEach(function (timeoutId) {\n        return clearTimeout(timeoutId);\n      });\n      activeTimeoutIds.splice(0, activeTimeoutIds.length);\n    };\n  }, []);\n\n  var onInternalMouseDown = function onInternalMouseDown(event) {\n    var _triggerRef$current;\n\n    var target = event.target;\n    var popupElement = (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.getPopupElement(); // We should give focus back to selector if clicked item is not focusable\n\n    if (popupElement && popupElement.contains(target)) {\n      var timeoutId = setTimeout(function () {\n        var index = activeTimeoutIds.indexOf(timeoutId);\n\n        if (index !== -1) {\n          activeTimeoutIds.splice(index, 1);\n        }\n\n        cancelSetMockFocused();\n\n        if (!mobile && !popupElement.contains(document.activeElement)) {\n          var _selectorRef$current3;\n\n          (_selectorRef$current3 = selectorRef.current) === null || _selectorRef$current3 === void 0 ? void 0 : _selectorRef$current3.focus();\n        }\n      });\n      activeTimeoutIds.push(timeoutId);\n    }\n\n    for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n      restArgs[_key3 - 1] = arguments[_key3];\n    }\n\n    onMouseDown === null || onMouseDown === void 0 ? void 0 : onMouseDown.apply(void 0, [event].concat(restArgs));\n  }; // ============================ Dropdown ============================\n\n\n  var _React$useState3 = React.useState(null),\n      _React$useState4 = _slicedToArray(_React$useState3, 2),\n      containerWidth = _React$useState4[0],\n      setContainerWidth = _React$useState4[1];\n\n  var _React$useState5 = React.useState({}),\n      _React$useState6 = _slicedToArray(_React$useState5, 2),\n      forceUpdate = _React$useState6[1]; // We need force update here since popup dom is render async\n\n\n  function onPopupMouseEnter() {\n    forceUpdate({});\n  }\n\n  useLayoutEffect(function () {\n    if (triggerOpen) {\n      var _containerRef$current;\n\n      var newWidth = Math.ceil((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.offsetWidth);\n\n      if (containerWidth !== newWidth && !Number.isNaN(newWidth)) {\n        setContainerWidth(newWidth);\n      }\n    }\n  }, [triggerOpen]); // Used for raw custom input trigger\n\n  var onTriggerVisibleChange;\n\n  if (customizeRawInputElement) {\n    onTriggerVisibleChange = function onTriggerVisibleChange(newOpen) {\n      onToggleOpen(newOpen);\n    };\n  } // Close when click on non-select element\n\n\n  useSelectTriggerControl(function () {\n    var _triggerRef$current2;\n\n    return [containerRef.current, (_triggerRef$current2 = triggerRef.current) === null || _triggerRef$current2 === void 0 ? void 0 : _triggerRef$current2.getPopupElement()];\n  }, triggerOpen, onToggleOpen, !!customizeRawInputElement); // ============================ Context =============================\n\n  var baseSelectContext = React.useMemo(function () {\n    return _objectSpread(_objectSpread({}, props), {}, {\n      notFoundContent: notFoundContent,\n      open: mergedOpen,\n      triggerOpen: triggerOpen,\n      id: id,\n      showSearch: mergedShowSearch,\n      multiple: multiple,\n      toggleOpen: onToggleOpen\n    });\n  }, [props, notFoundContent, triggerOpen, mergedOpen, id, mergedShowSearch, multiple, onToggleOpen]); // ==================================================================\n  // ==                            Render                            ==\n  // ==================================================================\n  // ============================= Arrow ==============================\n\n  var mergedShowArrow = showArrow !== undefined ? showArrow : loading || !multiple && mode !== 'combobox';\n  var arrowNode;\n\n  if (mergedShowArrow) {\n    arrowNode = /*#__PURE__*/React.createElement(TransBtn, {\n      className: classNames(\"\".concat(prefixCls, \"-arrow\"), _defineProperty({}, \"\".concat(prefixCls, \"-arrow-loading\"), loading)),\n      customizeIcon: inputIcon,\n      customizeIconProps: {\n        loading: loading,\n        searchValue: mergedSearchValue,\n        open: mergedOpen,\n        focused: mockFocused,\n        showSearch: mergedShowSearch\n      }\n    });\n  } // ============================= Clear ==============================\n\n\n  var clearNode;\n\n  var onClearMouseDown = function onClearMouseDown() {\n    var _selectorRef$current4;\n\n    onClear === null || onClear === void 0 ? void 0 : onClear();\n    (_selectorRef$current4 = selectorRef.current) === null || _selectorRef$current4 === void 0 ? void 0 : _selectorRef$current4.focus();\n    onDisplayValuesChange([], {\n      type: 'clear',\n      values: displayValues\n    });\n    onInternalSearch('', false, false);\n  };\n\n  if (!disabled && allowClear && (displayValues.length || mergedSearchValue) && !(mode === 'combobox' && mergedSearchValue === '')) {\n    clearNode = /*#__PURE__*/React.createElement(TransBtn, {\n      className: \"\".concat(prefixCls, \"-clear\"),\n      onMouseDown: onClearMouseDown,\n      customizeIcon: clearIcon\n    }, \"\\xD7\");\n  } // =========================== OptionList ===========================\n\n\n  var optionList = /*#__PURE__*/React.createElement(OptionList, {\n    ref: listRef\n  }); // ============================= Select =============================\n\n  var mergedClassName = classNames(prefixCls, className, (_classNames2 = {}, _defineProperty(_classNames2, \"\".concat(prefixCls, \"-focused\"), mockFocused), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-multiple\"), multiple), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-single\"), !multiple), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-allow-clear\"), allowClear), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-show-arrow\"), mergedShowArrow), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-disabled\"), disabled), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-loading\"), loading), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-open\"), mergedOpen), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-customize-input\"), customizeInputElement), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-show-search\"), mergedShowSearch), _classNames2)); // >>> Selector\n\n  var selectorNode = /*#__PURE__*/React.createElement(SelectTrigger, {\n    ref: triggerRef,\n    disabled: disabled,\n    prefixCls: prefixCls,\n    visible: triggerOpen,\n    popupElement: optionList,\n    containerWidth: containerWidth,\n    animation: animation,\n    transitionName: transitionName,\n    dropdownStyle: dropdownStyle,\n    dropdownClassName: dropdownClassName,\n    direction: direction,\n    dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n    dropdownRender: dropdownRender,\n    dropdownAlign: dropdownAlign,\n    placement: placement,\n    getPopupContainer: getPopupContainer,\n    empty: emptyOptions,\n    getTriggerDOMNode: function getTriggerDOMNode() {\n      return selectorDomRef.current;\n    },\n    onPopupVisibleChange: onTriggerVisibleChange,\n    onPopupMouseEnter: onPopupMouseEnter\n  }, customizeRawInputElement ? /*#__PURE__*/React.cloneElement(customizeRawInputElement, {\n    ref: customizeRawInputRef\n  }) : /*#__PURE__*/React.createElement(Selector, _extends({}, props, {\n    domRef: selectorDomRef,\n    prefixCls: prefixCls,\n    inputElement: customizeInputElement,\n    ref: selectorRef,\n    id: id,\n    showSearch: mergedShowSearch,\n    autoClearSearchValue: autoClearSearchValue,\n    mode: mode,\n    activeDescendantId: activeDescendantId,\n    tagRender: tagRender,\n    values: displayValues,\n    open: mergedOpen,\n    onToggleOpen: onToggleOpen,\n    activeValue: activeValue,\n    searchValue: mergedSearchValue,\n    onSearch: onInternalSearch,\n    onSearchSubmit: onInternalSearchSubmit,\n    onRemove: onSelectorRemove,\n    tokenWithEnter: tokenWithEnter\n  }))); // >>> Render\n\n  var renderNode; // Render raw\n\n  if (customizeRawInputElement) {\n    renderNode = selectorNode;\n  } else {\n    renderNode = /*#__PURE__*/React.createElement(\"div\", _extends({\n      className: mergedClassName\n    }, domProps, {\n      ref: containerRef,\n      onMouseDown: onInternalMouseDown,\n      onKeyDown: onInternalKeyDown,\n      onKeyUp: onInternalKeyUp,\n      onFocus: onContainerFocus,\n      onBlur: onContainerBlur\n    }), mockFocused && !mergedOpen && /*#__PURE__*/React.createElement(\"span\", {\n      style: {\n        width: 0,\n        height: 0,\n        position: 'absolute',\n        overflow: 'hidden',\n        opacity: 0\n      },\n      \"aria-live\": \"polite\"\n    }, \"\".concat(displayValues.map(function (_ref) {\n      var label = _ref.label,\n          value = _ref.value;\n      return ['number', 'string'].includes(_typeof(label)) ? label : value;\n    }).join(', '))), selectorNode, arrowNode, clearNode);\n  }\n\n  return /*#__PURE__*/React.createElement(BaseSelectContext.Provider, {\n    value: baseSelectContext\n  }, renderNode);\n}); // Set display name for dev\n\nif (process.env.NODE_ENV !== 'production') {\n  BaseSelect.displayName = 'BaseSelect';\n}\n\nexport default BaseSelect;"],"mappings":"AAAA,OAAOA,OAAO,MAAM,mCAAmC;AACvD,OAAOC,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,eAAe,MAAM,2CAA2C;AACvE,OAAOC,kBAAkB,MAAM,8C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